﻿using System;
using System.Net;
using System.Runtime.Serialization;

namespace BusinessObjects
{
    [DataContract]
    public enum ObjectsType
    {
        [EnumMember]
        Tree,
        [EnumMember]
        Rubbish,
        [EnumMember]
        Player,
        [EnumMember]
        Herb,
        [EnumMember]
        Bench,
        [EnumMember]
        Lake,
        [EnumMember]
        Home,
        [EnumMember]
        Tower,
        [EnumMember]
        Windmill,
        [EnumMember]
        StonePath
    }

    [DataContract]
    public enum TreeType
    {
        [EnumMember]
        Tree1,
        [EnumMember]
        Tree2,
        [EnumMember]
        Tree3,
        [EnumMember]
        Tree4,
        [EnumMember]
        Tree5,
        [EnumMember]
        Tree6
    }

    [DataContract]
    public enum PlacesEnumeration
    {
        [EnumMember]
        Africa,

        [EnumMember]
        USA,

        [EnumMember]
        Asia, 

        [EnumMember]
        Australia
    }

    [DataContract]
    public enum MoveDirection
    {
        [EnumMember]
        Left,
        [EnumMember]
        Right,
        [EnumMember]
        Down,
        [EnumMember]
        Up
    }

    [DataContract]
    public enum UserAction
    {
        [EnumMember]
        MouseClick,
        [EnumMember]
        KeyPressed
    }

    [DataContract]
    public enum GameMode
    {
        [EnumMember]
        SinglePlayer,
        [EnumMember]
        MultiPlayer
    }

    [DataContract]
    public enum SocketMessageKeys
    {
        [EnumMember]
        Subscribe = 0,
        [EnumMember]
        UnSubscribe = 1,
        [EnumMember]
        GameInicialization = 2,
        [EnumMember]
        MoveToPosition = 3,
        [EnumMember]
        BinsStatusUpdate = 4,

        /// <summary>
        /// You can intiate two types of events - single and multyplayer.
        /// 
        ///   - The myltyplayer type will require a set of badges for you having been 
        ///     connected with a specified number of other players on the map.
        ///     In case of this kind of event: 
        ///     -  You send StartEvent to the server. 
        ///     -  The server sends JoinEventRequest to all the players to whom you are currently connected
        ///     -  The server sends SupportEventRequest to all the other players on the map
        ///     -  The server returns... and you are ready.
        ///   - The single player type is the same except that the server sends SupportEventRequest to all 
        ///     the players on the map.
        ///     
        ///   At some point the other players can send you JoinEventResponse and SupportEventResponse with
        ///   comments and sender player information. A pop up appears giving you info.
        ///     - If the player selects to Support your event his Experience is increased and the number of 
        ///       the events he is taking part in +1
        ///     - If the player selects to Join your event -||- and a badge of the event appears at the top 
        ///       left corner... clicking on it he can find out more about the event        /// 
        /// </summary>
        [EnumMember]
        StartEvent = 5,
        [EnumMember]
        JoinEventRequest = 6,
        [EnumMember]
        JoinEventResponse = 7, // + Feedback 
        [EnumMember]
        SupportEventRequest = 8,
        [EnumMember]
        SupportEventResponse = 9,

        [EnumMember]
        HelpWithAQuestionRequest = 10,
        [EnumMember]
        HelpWithAQuestionResponse = 11,
        [EnumMember]
        SendTnakYouNote = 12,

        [EnumMember]
        PlayerConnectionRequest = 13,
        [EnumMember]
        PlayerConnectionResponse = 14,
        [EnumMember]
        Chat = 15,

        [EnumMember]
        Ping = 16,
        [EnumMember]
        PingResponse = 17,

        [EnumMember]
        RubbishUpdate = 18,
        
        /// <summary>
        /// When one of the players on the map takes a quest or wins a badge, 
        /// everybody else has to be told about it, through these messages.
        /// </summary>
        [EnumMember]
        BuildQuestUpdate = 19,
        [EnumMember]
        BuildQuestUpdateRequest = 20,
        [EnumMember]
        BuildTeamQuestUpdateRequest = 21,

        [EnumMember]
        BadgeWonUpdate = 22,
        [EnumMember]
        QuestCompleted = 23
    }

    /// <summary>
    /// Lock             - the server sends this to all the player except 
    ///                    the main player to tell them that smb. is taking 
    ///                    care of the rubbish disables it on the other players'maps
    /// Unlock           - if the Player decides to take no action, the other 
    ///                    player should be able to go and recycle the rubbish
    /// AskForHelp       - the player sends this to the server
    /// HelpPlayerDecide - the server responds with a HelpPlayerDecide to all the 
    ///                    player on the map and a ? appears on their maps
    ///  UpdateServer    - the player sends this to the server when he has recycled correctly
    ///  Remove          - the server responds to a UpdateServer with this this to all  
    ///                    the players to tell them to remove the rubbish from their map
    /// </summary>
    [DataContract]
    public enum RubbishRemovalStatus
    {
        [EnumMember]
        Lock = 0,
        [EnumMember]
        Unlock = 1,
        [EnumMember]
        AskForHelp = 2,
        [EnumMember]
        HelpPlayerDecide = 3,
        [EnumMember]
        UpdateServer = 4,
        [EnumMember]
        Remove = 5
    }

    [DataContract]
    public enum BadgeTypes
    {
        [EnumMember]
        RubbishAmountBadge = 0,
        [EnumMember]
        HelpFriendBadge = 1,
        [EnumMember]
        DangerousRubbishesBadge = 2
    }

    [DataContract]
    public enum RegionObjectTypes
    {
        [EnumMember]
        Causes = 0,
        [EnumMember]
        Build = 1,
        [EnumMember]
        Rubbish = 2,
        [EnumMember]
        Other = 3
    }

    [DataContract]
    public enum CharacterTypes
    {
        [EnumMember]
        Boy = 0,
        [EnumMember]
        Girl = 1,
        [EnumMember]
        Moli = 2,
        [EnumMember]
        Kido = 3,
        [EnumMember]
        Moni = 4,
        [EnumMember]
        Sebastian
    }

    [DataContract]
    public enum BuildQuestTypes
    {
        [EnumMember]
        WindTurbine = 0,
        [EnumMember]
        WaterPlant = 1,
        [EnumMember]
        BirdFeeder = 2,
        [EnumMember]
        Causes = 3
    }
}
